<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Context Menu on DataGrid - jQuery EasyUI Demo</title>
    <script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${request.getContextPath()}/static/easyui/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/easyui/themes/icon.css">
<#--<link rel="stylesheet" type="text/css" href="/static/easyui/demo/demo.css">-->
    <#--<script type="text/javascript" src="/static/easyui/js/jquery.min.js"></script>-->

    <script type="text/javascript">
        $(function () {
            var head = document.getElementsByTagName("head")[0];
            var script = document.createElement('script');
            var timestamp = new Date().getTime();
            var s = '/static/js/config.js?t=' + timestamp;
            script.type = 'text/javascript';
            script.src = s;
            script.onload = function () {
                loadJS("index");
            };
            head.appendChild(script);
        });

        function test() {
            console.info(Common.formatStatus("1"));
        }
    </script>
</head>
<div style="width:40%;">
    <div id="pgrid" title="DataGrid" closable="true" style="height:200px;">
        <table class="easyui-datagrid" style="width:650px;height:auto"
               fit="true" border="false"
               singleSelect="true"
               idField="itemid" url="${request.contextPath}/portal/json">
            <thead>
            <tr>
                <th field="itemid" width="60">Item ID</th>
                <th field="productid" width="60">Product ID</th>
                <th field="listprice" width="80" align="right">List Price</th>
                <th field="unitcost" width="80" align="right">Unit Cost</th>
                <th field="attr1" width="120">Attribute</th>
                <th field="status" width="50" align="center" formatter="Common.formatStatus">Status</th>
            </tr>
            </thead>
        </table>
    </div>
</div>
<body>
<input type="button" onclick="test()" value="test">
</body>
</html>